#include <iostream>
#include <map>
#include <string>

using namespace std;

int main()
{
    string tmp;
    map<string, int> dic;
    while (cin >> tmp)
    {
        tmp[0] = tolower(tmp[0]);
        int a = tmp.find('.');
        if (a != -1)
        {
            tmp.erase(a);
        }
        dic[tmp]++;
    }
    for (auto e: dic)
    {
        cout << e.first << ":" << e.second << endl;
    }
    return 0;
}